<template>
	<el-container style="padding: 20px">
		<el-header>
			<el-button
				size="mini"
				type="primary"
				@click="showModal('', '导出')"
				icon="el-icon-folder-opened"
				:disabled="!Array.isArray(fundManagerList) || fundManagerList.length === 0"
				>导出</el-button
			>
			<el-button size="mini" type="primary" @click="showModal('0', '任职')">任职</el-button>
			<!-- <el-button size="mini" type="primary" @click="showModal('1', '免职')">免职</el-button>
			<el-button size="mini" type="primary" @click="showModal('2', '任免职')">任免职</el-button> -->
		</el-header>
		<el-header style="height: 100%">
			<el-form>
				<el-form-item label="基金状态：">
					<el-checkbox-group v-model="operationStatus">
						<el-checkbox v-for="item in productDictList" :label="item.typeCode" :key="item.typeCode" @change="searchClick()"
							>{{ item.typeName }}
						</el-checkbox>
					</el-checkbox-group>
				</el-form-item>

				<el-form-item label=" 基金名称：" style="width: 20%">
					<el-select v-model="fundSysCode" clearable filterable @change="searchClick()" size="medium">
						<el-option key="" label="--全部--" value=""> </el-option>
						<el-option
							v-for="(item, index) in fundList"
							:key="index + item.fundSysCode"
							:label="item.fundCode + '-' + item.fundFullName"
							:value="item.fundSysCode"
						>
						</el-option>
					</el-select>
				</el-form-item>

				<el-form-item label="基金经理名称：" style="width: 21%">
					<el-select v-model="managerId" clearable filterable @change="searchClick()" size="medium">
						<el-option key="" label="--全部--" value=""> </el-option>
						<el-option
							v-for="(item, index) in managerList"
							:key="index + item.managerId"
							:label="item.managerName"
							:value="item.managerId"
						>
						</el-option>
					</el-select>
				</el-form-item>

				<el-form-item label="基金成立日：" style="width: 23%">
					<el-date-picker
						type="date"
						style="width: 245px"
						v-model="establishDate"
						value-format="yyyyMMdd"
						format="yyyy-MM-dd"
						@change="searchClick()"
						size="medium"
						placeholder="基金成立日大于等于选择日期"
					></el-date-picker>
				</el-form-item>

				<el-form-item label="管理状态：">
					<el-checkbox v-model="entryStatus" :label="0" @change="searchClick()">管理中</el-checkbox>
					<el-checkbox v-model="entryStatus" :label="1" @change="searchClick()">已离任</el-checkbox>
				</el-form-item>

				<el-form-item label="产品任职日期：">
					<el-date-picker
						v-model="value1"
						type="daterange"
						align="right"
						unlink-panels
						value-format="yyyyMMdd"
						format="yyyy-MM-dd"
						range-separator="至"
						start-placeholder="开始日期"
						end-placeholder="结束日期"
						@change="searchClick()"
						size="medium"
						:picker-options="pickerOptions"
					>
					</el-date-picker>
				</el-form-item>

				<el-form-item label="产品离任日期：">
					<el-date-picker
						v-model="value2"
						type="daterange"
						align="right"
						size="medium"
						unlink-panels
						value-format="yyyyMMdd"
						format="yyyy-MM-dd"
						range-separator="至"
						start-placeholder="开始日期"
						end-placeholder="结束日期"
						@change="searchClick()"
						:picker-options="pickerOptions"
					>
					</el-date-picker>
				</el-form-item>
			</el-form>
		</el-header>
		<el-main>
			<div style="display: flex; margin-bottom: 16px">
				<el-dropdown>
					<el-button size="small"> 清除筛选条件<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
					<el-dropdown-menu slot="dropdown" trigger="click">
						<el-dropdown-item v-for="(item, index) in listItem" :key="index" @click.native="resetDateFilter(item.value)">{{
							item.key
						}}</el-dropdown-item>
					</el-dropdown-menu>
				</el-dropdown>
				<el-button size="small" @click="clearFilter" style="margin-left: 16px">清除所有筛选条件</el-button>
			</div>
			<el-table
				:data="fundManagerList"
				border
				@selection-change="selectionChange"
				ref="filterTable"
				:header-cell-style="{ background: '#FAFAFA' }"
			>
				<el-table-column type="selection" width="50" :selectable="selectInit"> </el-table-column>
				<el-table-column prop="pkSerial" label="id" width="0" v-if="false"> </el-table-column>
				<el-table-column
					prop="fundCode"
					fixed
					label="基金代码"
					width="120"
					sortable
					column-key="fundCode"
					:filters="returnFilterArray('fundCode')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
				</el-table-column>
				<el-table-column
					prop="fundFullName"
					fixed
					label="基金名称"
					width="120"
					sortable
					column-key="fundFullName"
					:filters="returnFilterArray('fundFullName')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						<hintCom property="fundFullName" :item="scope.row" :index="scope.$index" />
					</template>
				</el-table-column>
				<el-table-column
					prop="fundName"
					fixed
					label="基金简称"
					width="120"
					sortable
					column-key="fundName"
					:filters="returnFilterArray('fundName')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						<hintCom property="fundName" :item="scope.row" :index="scope.$index" />
					</template>
				</el-table-column>
				<el-table-column
					prop="managerName"
					fixed
					label="基金经理"
					width="90"
					column-key="managerName"
					:filters="returnFilterArray('managerName')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						<hintCom property="managerName" :item="scope.row" :index="scope.$index" />
					</template>
				</el-table-column>
				<el-table-column
					prop="managerJobTypeName"
					fixed
					label="基金经理职务类型"
					width="190"
					column-key="managerJobTypeName"
					:filters="returnFilterArray('managerJobTypeName')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
				</el-table-column>
				<el-table-column
					prop="startDate"
					label="任职日期"
					width="120"
					sortable
					column-key="startDate"
					:filters="returnFilterArray('startDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.startDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="endDate"
					label="离任日期"
					width="120"
					sortable
					column-key="endDate"
					:filters="returnFilterArray('endDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.endDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="manageStatus"
					label="管理状态"
					width="90"
					column-key="manageStatus"
					:filters="returnFilterArray('manageStatus')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						<span :style="scope.row.manageStatus === '0' ? 'color:#67C23A' : 'color:#F56C6C'" v-if="scope.row.manageStatus != null">
							{{ scope.row.manageStatus === '0' ? '管理中' : '已离任' }}
						</span>
					</template>
				</el-table-column>
				<!-- <el-table-column
					prop="generalMeetingReplyDate"
					label="任职总办会批复时间"
					width="190"
					sortable
					column-key="generalMeetingReplyDate"
					:filters="returnFilterArray('generalMeetingReplyDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.generalMeetingReplyDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="leaveGeneralMeetingReplyDate"
					label="离职总办会批复时间"
					width="190"
					sortable
					column-key="leaveGeneralMeetingReplyDate"
					:filters="returnFilterArray('leaveGeneralMeetingReplyDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.leaveGeneralMeetingReplyDate | timerConversionStr }}
					</template>
				</el-table-column> -->
				<el-table-column
					prop="entryReportBodDate"
					label="任职报送公司决议时间"
					width="210"
					sortable
					column-key="entryReportBodDate"
					:filters="returnFilterArray('entryReportBodDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.entryReportBodDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="entryBodResolutionDate"
					label="任职公司批复时间"
					width="190"
					sortable
					column-key="entryBodResolutionDate"
					:filters="returnFilterArray('entryBodResolutionDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.entryBodResolutionDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="entrySubmittedDate"
					label="任职报送协会时间"
					width="170"
					sortable
					column-key="entrySubmittedDate"
					:filters="returnFilterArray('entrySubmittedDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.entrySubmittedDate | timerConversionStr }}
					</template>
				</el-table-column>

				<el-table-column
					prop="entrySocietyReplyDate"
					label="任职协会批复时间"
					width="170"
					sortable
					column-key="entrySocietyReplyDate"
					:filters="returnFilterArray('entrySocietyReplyDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.entrySocietyReplyDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="entryNoticeDate"
					label="任职公告时间"
					width="150"
					sortable
					column-key="entryNoticeDate"
					:filters="returnFilterArray('entryNoticeDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.entryNoticeDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="leaveReportBodDate"
					label="离职报送公司决议时间"
					width="210"
					sortable
					column-key="leaveReportBodDate"
					:filters="returnFilterArray('leaveReportBodDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.leaveReportBodDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="leaveBodResolutionDate"
					label="离职公司批复时间"
					width="190"
					sortable
					column-key="leaveBodResolutionDate"
					:filters="returnFilterArray('leaveBodResolutionDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.leaveBodResolutionDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="leaveSubmittedDate"
					label="离职报送协会时间"
					width="170"
					sortable
					column-key="leaveSubmittedDate"
					:filters="returnFilterArray('leaveSubmittedDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.leaveSubmittedDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="leaveSocietyReplyDate"
					label="离职协会批复时间"
					width="180"
					sortable
					column-key="leaveSocietyReplyDate"
					:filters="returnFilterArray('leaveSocietyReplyDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.leaveSocietyReplyDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column
					prop="leaveNoticeDate"
					label="离职公告时间"
					width="150"
					sortable
					column-key="leaveNoticeDate"
					:filters="returnFilterArray('leaveNoticeDate')"
					:filter-method="filterHandler"
					filter-placement="bottom"
				>
					<template slot-scope="scope">
						{{ scope.row.leaveNoticeDate | timerConversionStr }}
					</template>
				</el-table-column>
				<el-table-column prop="remarks" label="备注" width="100">
					<template slot-scope="scope">
						<hintCom property="remarks" :item="scope.row" :index="scope.$index" />
					</template>
				</el-table-column>
				<el-table-column prop="operation" label="操作" fixed="right" width="100">
					<template slot-scope="scope">
						<el-button size="mini" type="text" class="widths" @click="editInfo('查看', scope.row)">查 看</el-button>
						<el-button size="mini" type="text" @click="editInfo('修改', scope.row)">修 改</el-button>
					</template>
				</el-table-column>
			</el-table>
			<el-pagination
				background
				:page-size="paging.size"
				@current-change="handleCurrentChange"
				@size-change="handleSizeChange"
				:current-page="paging.num"
				:page-sizes="paging.sizes"
				layout="sizes,prev,pager,next,jumper,total"
				:total="paging.total"
			/>
		</el-main>
		<infoCom
			:title="title"
			:addComShow="addComShow"
			@comIsShow="comIsShow"
			@queryFundManagerList="getFundManagerList"
			:managerList="managerList"
			:fundList="fundList"
			:enumList="enumList"
			ref="infoCom"
		/>
		<editCom
			:title="editTitle"
			:addComShow="ediTComShow"
			@comIsShow="editComIsShow"
			:fundList="fundList"
			:enumList="enumList"
			@queryFundManagerList="getFundManagerList"
			ref="editCom"
		/>
	</el-container>
</template>
<script>
import { downloadFile, getEnum } from '@/api/productApi/file'
import { getFundList } from '@/api/productApi/mechanism'
import { getHrFundManager, exportHrFundManager } from '@/api/productApi/fundManager'
import infoCom from './components/infoCom' // 任免职组件
import editCom from './components/editCom' // 查看、编辑组件
import { fundList } from '@/api/productApi/home'
import { debounce } from '@/utils/debounceFunc'
import { timerConversionStr } from '@/filters/index'
export default {
	name: 'PublicOffering',
	components: {
		infoCom,
		editCom
	},
	data() {
		return {
			title: '',
			addComShow: false,
			editTitle: '',
			ediTComShow: false,
			pageCode: '', // 需要展示哪一股基金
			fundManagerList: [], // 基金-基金经理关系列表
			fundList: [], // 基金列表（下拉框）
			managerList: [], // 经理列表（下拉框）
			fundSysCode: '', // 查询条件（基金代码）
			operationStatus: [], // 查询条件（基金状态：00未成立，10运作中，20清盘中，30已清盘）
			managerId: '', // 查询条件（经理名字）
			entryStatus: [0, 1], // 查询条件（管理状态：0在职 1离职）
			establishDate: '', // 查询条件（基金成立日>=）
			selectionInfo: [], // 选中的信息
			type: '', // 0 任职 1 免职 2 任免职
			editType: '', // 1查看 2编辑
			managerType: '1', // hr选择经理的类型（1：公募基金基金经理 2：专户产品投资经理）
			productDictList: [], // 字典列表
			formInfo: {
				// el-dialog中相关信息
				formShow: false,
				formSrc: '',
				title: ''
			},
			formInfo2: {
				// el-dialog中相关信息
				formShow: false,
				formSrc: '',
				title: ''
			},
			pickerOptions: {
				shortcuts: [
					{
						text: '最近一周',
						onClick(picker) {
							const end = new Date()
							const start = new Date()
							start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
							picker.$emit('pick', [start, end])
						}
					},
					{
						text: '最近一个月',
						onClick(picker) {
							const end = new Date()
							const start = new Date()
							start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
							picker.$emit('pick', [start, end])
						}
					},
					{
						text: '最近三个月',
						onClick(picker) {
							const end = new Date()
							const start = new Date()
							start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
							picker.$emit('pick', [start, end])
						}
					}
				]
			},
			value1: [],
			value2: [],
			paging: {
				// 分页配置
				// 显示的条目数
				size: 10,
				// 当前页数
				num: 1,
				total: 0,
				pages: 0,
				sizes: [10, 50, 100, 200]
			},
			listItem: [
				{ key: '基金代码', value: 'fundCode' },
				{ key: '基金名称', value: 'fundFullName' },
				{ key: '基金简称', value: 'fundName' },
				{ key: '基金经理', value: 'managerName' },
				{ key: '任职日期', value: 'startDate' },
				{ key: '离任日期', value: 'endDate' },
				{ key: '管理状态', value: 'manageStatus' },
				// { key: '任职总办会批复时间', value: 'generalMeetingReplyDate' },
				// { key: '离职总办会批复时间', value: 'leaveGeneralMeetingReplyDate' },
				{ key: '任职报送公司决议时间', value: 'entryReportBodDate' },
				{ key: '任职公司批复时间', value: 'entryBodResolutionDate' },
				{ key: '任职报送协会时间', value: 'entrySubmittedDate' },
				{ key: '任职协会批复时间', value: 'entrySocietyReplyDate' },
				{ key: '任职公告时间', value: 'entryNoticeDate' },
				{ key: '离职报送公司决议时间', value: 'leaveReportBodDate' },
				{ key: '离职公司批复时间', value: 'leaveBodResolutionDate' },
				{ key: '离职报送协会时间', value: 'leaveSubmittedDate' },
				{ key: '离职协会批复时间', value: 'leaveSocietyReplyDate' },
				{ key: '离职公告时间', value: 'leaveNoticeDate' }
			],
			enumList: []
		}
	},
	mounted() {
		// 初始化基金经理列表
		this.selectManagerList()
		// 初始化查询条件（基金状态）
		this.initOperationStatus()
		// 初始化基金列表（下拉框）
		this.getFundList()
		this.getEnumData()
	},
	methods: {
		getEnumData() {
			getEnum(['managerJobType']).then(res => {
				if (res.msgCode === 'Y') {
					this.enumList = res.data.body.managerJobType.filter(item => item.managerType === '1')
				}
			})
		},

		resetDateFilter(msg) {
			this.$refs.filterTable.clearFilter(msg)
		},
		clearFilter() {
			this.$refs.filterTable.clearFilter()
		},
		returnFilterArray(property) {
			const array = []
			if (
				[
					'endDate',
					'generalMeetingReplyDate',
					'leaveGeneralMeetingReplyDate',
					'entryReportBodDate',
					'entryBodResolutionDate',
					'entrySubmittedDate',
					'entrySocietyReplyDate',
					'entryNoticeDate',
					'leaveReportBodDate',
					'leaveBodResolutionDate',
					'leaveSubmittedDate',
					'leaveSocietyReplyDate',
					'leaveNoticeDate',
					'startDate'
				].includes(property)
			) {
				this.fundManagerList.forEach(item => {
					if (!array.some(items => items.text === timerConversionStr(item[property])) && !!item[property]) {
						const obj = { text: timerConversionStr(item[property]), value: item[property] }
						array.push(obj)
					}
				})
			} else if (property === 'manageStatus') {
				this.fundManagerList.forEach(item => {
					if (!array.some(items => items.value === item[property]) && !!item[property]) {
						const obj = { text: item.manageStatus === '0' ? '管理中' : '已离任', value: item[property] }
						array.push(obj)
					}
				})
			} else {
				this.fundManagerList.forEach(item => {
					if (!array.some(items => items.value === item[property]) && !!item[property]) {
						const obj = { text: item[property], value: item[property] }
						array.push(obj)
					}
				})
			}
			return array
		},
		filterHandler(value, row, column) {
			const property = column['property']
			return row[property] === value
		},

		showModal(type, title) {
			// 0 任职 1 免职 2 任免职 空 导出文件
			if (type) {
				if (type === '0') {
					this.title = title
					this.comIsShow()
					// this.$refs.infoCom.fundDefault()
				} else {
					if (!this.selectionInfo.length) {
						this.$message({ type: 'warning', message: '免职人员不能为空，请重新选择！' })
						return
					}
					if (this.selectionInfo.some(item => this.selectionInfo[0].fundSysCode !== item.fundSysCode)) {
						this.$message({ type: 'warning', message: '选中基金存在不同基金，请重新选择' })
						return
					}
					this.$refs.infoCom.edit(JSON.stringify(this.selectionInfo))
					this.title = title
					this.comIsShow()
				}
			} else {
				const params = {}
				params.fundSysCode = this.fundSysCode
				params.managerId = this.managerId
				if (this.entryStatus != null) {
					if (this.entryStatus.length > 1) {
						params.entryStatus = '2'
					} else {
						params.entryStatus = this.entryStatus[0]
					}
				}
				params.operationStatus = this.operationStatus
				params.fundRaiseType = '1'
				params.establishDate = this.establishDate
				if (this.value1 != null && this.value1.length > 0) {
					params.startSTime = this.value1[0]
					params.endSTime = this.value1[1]
				}
				if (this.value2 != null && this.value2.length > 0) {
					params.startETime = this.value2[0]
					params.endETime = this.value2[1]
				}
				exportHrFundManager(params).then(res => {
					if (res.msgCode === 'Y') {
						const file = { fid: res.data.body }
						downloadFile(file).then(item => {
							if (item.msgCode === 'N') {
								this.$message({ showClose: true, message: '文件不存在', type: 'error' })
								return
							}
							if (item) {
								this.$message({
									showClose: true,
									message: '正在打开，请稍等......',
									type: 'success'
								})
								window.open(`/update/download.do?fid=${res.data.body}`)
							}
						})
					}
				})
			}
		},
		// 查看基金和经理的详细信息
		editInfo(title, item) {
			this.editTitle = title
			this.editComIsShow()
			this.$refs.editCom.edit(item)
		},
		editComIsShow() {
			this.ediTComShow = !this.ediTComShow
		},
		comIsShow() {
			this.addComShow = !this.addComShow
		},
		// 初始化查询条件（基金状态）
		initOperationStatus() {
			getEnum(['fundOperationStatus']).then(res => {
				if (res.msgCode === 'Y') {
					this.productDictList = res.data.body.fundOperationStatus
					this.productDictList.forEach(item => {
						this.operationStatus.push(item.typeCode)
					})
				}
			})
		},
		// 基金列表（下拉框）
		getFundList() {
			getFundList({ fundRaiseType: this.managerType }).then(res => {
				if (res.msgCode === 'Y') {
					res.data.body.forEach(item => {
						if (item.baseInfo) {
							item.fundFullName = item.baseInfo.fundFullName
							item.fundName = item.baseInfo.fundName
							item.fundCode = item.baseInfo.fundCode
						}
					})
					this.fundList = res.data.body
					// 如果有返回pageCode就显示这个基金的页面，如果没有返回pageCode就展示全部
					if (this.pageCode != null) {
						this.fundSysCode = this.pageCode
					} else {
						this.fundSysCode = ''
					}
					// 初始化页面数据（基金-基金经理关系列表）
					this.getFundManagerList()
				}
			})
		},

		// 基金经理列表（下拉框）
		selectManagerList() {
			fundList({ managerTypeList: ['1'] }).then(res => {
				if (res.msgCode === 'Y') {
					this.managerList = res.data.body
				}
			})
		},
		// 基金-基金经理关系列表
		getFundManagerList: debounce(function() {
			const params = {}
			params.fundSysCode = this.fundSysCode
			params.managerId = this.managerId
			if (this.entryStatus != null) {
				if (this.entryStatus.length > 1) {
					params.entryStatus = '2'
				} else {
					params.entryStatus = this.entryStatus[0]
				}
			}
			params.operationStatus = this.operationStatus
			params.fundRaiseType = '1'
			params.establishDate = this.establishDate
			if (this.value1 != null && this.value1.length > 0) {
				params.startSTime = this.value1[0]
				params.endSTime = this.value1[1]
			}
			if (this.value2 != null && this.value2.length > 0) {
				params.startETime = this.value2[0]
				params.endETime = this.value2[1]
			}
			getHrFundManager(params, this.paging).then(res => {
				if (res.msgCode === 'Y') {
					if (res.data.body.list.length) {
						res.data.body.list.forEach(item => {
							if ('baseInfo' in item && item.baseInfo.length) {
								item.fundName = item.baseInfo[0].fundName
								item.fundCode = item.baseInfo[0].fundCode
								item.fundFullName = item.baseInfo[0].fundFullName
								if (item.managerJobType) {
									item.managerJobTypeName = this.enumList.find(items => items.typeCode === item.managerJobType).typeName
								} else {
									item.managerJobTypeName = ''
								}
							}
						})
					}
					this.fundManagerList = res.data.body.list
					this.paging.total = res.data.body.total
				}
			})
		}, 100),
		// 复选框更改值
		selectionChange(val) {
			this.selectionInfo = val
		},
		// 当管理状态为不在管理的状态时（1）禁止复选框
		selectInit(row) {
			if (row.manageStatus === 0) {
				return true
			} else if (row.manageStatus === 1) {
				return false
			}
		},
		// 搜索
		searchClick: function() {
			this.paging.num = 1
			this.getFundManagerList()
		},
		// 改变页数
		handleCurrentChange(val) {
			this.paging.num = val
			this.getFundManagerList()
		},
		// 改变条数
		handleSizeChange(val) {
            this.paging.num = 1
			this.paging.size = val
			this.getFundManagerList()
		}
	}
}
</script>
<style lang="scss" scoped src='./index.scss'>
</style>
